{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "b9142b48",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>project_id</th>\n",
       "      <th>purchase_project_type_mean</th>\n",
       "      <th>bidder</th>\n",
       "      <th>bid_price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>7AF0FF9F9C244A679BB07B5CF63AA1D8</td>\n",
       "      <td>货物</td>\n",
       "      <td>闪购软件公司</td>\n",
       "      <td>777777.77</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>7AF0FF9F9C244A679BB07B5CF63AA1D8</td>\n",
       "      <td>货物</td>\n",
       "      <td>深圳市华为技术有限公司7777</td>\n",
       "      <td>888888.88</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>7AF0FF9F9C244A679BB07B5CF63AA1D8</td>\n",
       "      <td>货物</td>\n",
       "      <td>珠海格力电器股份有限公司</td>\n",
       "      <td>955555.55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>03883E99BA7446BDA6622B5DC496A85D</td>\n",
       "      <td>工程</td>\n",
       "      <td>闪购软件公司</td>\n",
       "      <td>876543.21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>03883E99BA7446BDA6622B5DC496A85D</td>\n",
       "      <td>工程</td>\n",
       "      <td>深圳市国采软件公司</td>\n",
       "      <td>998765.43</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8309</th>\n",
       "      <td>A38C772C3A1E43E880F66721A2359243</td>\n",
       "      <td>货物</td>\n",
       "      <td>云智谷物联网技术（深圳）有限公司</td>\n",
       "      <td>1202235.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8310</th>\n",
       "      <td>A38C772C3A1E43E880F66721A2359243</td>\n",
       "      <td>货物</td>\n",
       "      <td>广州道熙建材有限公司</td>\n",
       "      <td>879329.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8311</th>\n",
       "      <td>10895A88C81C4FD0923CD515E90C66F5</td>\n",
       "      <td>服务</td>\n",
       "      <td>广东知青搬家集团有限公司</td>\n",
       "      <td>1798000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8312</th>\n",
       "      <td>10895A88C81C4FD0923CD515E90C66F5</td>\n",
       "      <td>服务</td>\n",
       "      <td>广州欧玮仪器技术有限公司</td>\n",
       "      <td>1799100.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8313</th>\n",
       "      <td>10895A88C81C4FD0923CD515E90C66F5</td>\n",
       "      <td>服务</td>\n",
       "      <td>广州仪速安电子科技有限公司</td>\n",
       "      <td>1797950.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>8314 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                            project_id purchase_project_type_mean  \\\n",
       "0     7AF0FF9F9C244A679BB07B5CF63AA1D8                         货物   \n",
       "1     7AF0FF9F9C244A679BB07B5CF63AA1D8                         货物   \n",
       "2     7AF0FF9F9C244A679BB07B5CF63AA1D8                         货物   \n",
       "3     03883E99BA7446BDA6622B5DC496A85D                         工程   \n",
       "4     03883E99BA7446BDA6622B5DC496A85D                         工程   \n",
       "...                                ...                        ...   \n",
       "8309  A38C772C3A1E43E880F66721A2359243                         货物   \n",
       "8310  A38C772C3A1E43E880F66721A2359243                         货物   \n",
       "8311  10895A88C81C4FD0923CD515E90C66F5                         服务   \n",
       "8312  10895A88C81C4FD0923CD515E90C66F5                         服务   \n",
       "8313  10895A88C81C4FD0923CD515E90C66F5                         服务   \n",
       "\n",
       "                bidder   bid_price  \n",
       "0               闪购软件公司   777777.77  \n",
       "1      深圳市华为技术有限公司7777   888888.88  \n",
       "2         珠海格力电器股份有限公司   955555.55  \n",
       "3               闪购软件公司   876543.21  \n",
       "4            深圳市国采软件公司   998765.43  \n",
       "...                ...         ...  \n",
       "8309  云智谷物联网技术（深圳）有限公司  1202235.00  \n",
       "8310        广州道熙建材有限公司   879329.00  \n",
       "8311      广东知青搬家集团有限公司  1798000.00  \n",
       "8312      广州欧玮仪器技术有限公司  1799100.00  \n",
       "8313     广州仪速安电子科技有限公司  1797950.00  \n",
       "\n",
       "[8314 rows x 4 columns]"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "data = pd.read_csv('d:/data/tdz_opening_bid_report.csv',usecols=['source_id','purchase_project_type_mean','bidder','bid_price'])\n",
    "data"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d73d9d16",
   "metadata": {},
   "source": [
    "# pd.notnull()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "fc11d63b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>project_id</th>\n",
       "      <th>purchase_project_type_mean</th>\n",
       "      <th>bidder</th>\n",
       "      <th>bid_price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8309</th>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8310</th>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8311</th>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8312</th>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8313</th>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "      <td>True</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>8314 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      project_id  purchase_project_type_mean  bidder  bid_price\n",
       "0           True                        True    True       True\n",
       "1           True                        True    True       True\n",
       "2           True                        True    True       True\n",
       "3           True                        True    True       True\n",
       "4           True                        True    True       True\n",
       "...          ...                         ...     ...        ...\n",
       "8309        True                        True    True       True\n",
       "8310        True                        True    True       True\n",
       "8311        True                        True    True       True\n",
       "8312        True                        True    True       True\n",
       "8313        True                        True    True       True\n",
       "\n",
       "[8314 rows x 4 columns]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 逐个判断是否是空\n",
    "pd.notnull(data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "b068b94b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "False"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 是不是全部都是非空 \n",
    "np.all(pd.notnull(data))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "52f1451c",
   "metadata": {},
   "source": [
    "# pd.isnull()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "016a061e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>project_id</th>\n",
       "      <th>purchase_project_type_mean</th>\n",
       "      <th>bidder</th>\n",
       "      <th>bid_price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8309</th>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8310</th>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8311</th>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8312</th>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8313</th>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>8314 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      project_id  purchase_project_type_mean  bidder  bid_price\n",
       "0          False                       False   False      False\n",
       "1          False                       False   False      False\n",
       "2          False                       False   False      False\n",
       "3          False                       False   False      False\n",
       "4          False                       False   False      False\n",
       "...          ...                         ...     ...        ...\n",
       "8309       False                       False   False      False\n",
       "8310       False                       False   False      False\n",
       "8311       False                       False   False      False\n",
       "8312       False                       False   False      False\n",
       "8313       False                       False   False      False\n",
       "\n",
       "[8314 rows x 4 columns]"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.isnull(data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "86b7a450",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 是不是存在空值\n",
    "np.any(pd.isnull(data))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b2f1675e",
   "metadata": {},
   "source": [
    "# 删除空行 dropna()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "d190837a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>project_id</th>\n",
       "      <th>purchase_project_type_mean</th>\n",
       "      <th>bidder</th>\n",
       "      <th>bid_price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>7AF0FF9F9C244A679BB07B5CF63AA1D8</td>\n",
       "      <td>货物</td>\n",
       "      <td>闪购软件公司</td>\n",
       "      <td>777777.77</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>7AF0FF9F9C244A679BB07B5CF63AA1D8</td>\n",
       "      <td>货物</td>\n",
       "      <td>深圳市华为技术有限公司7777</td>\n",
       "      <td>888888.88</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>7AF0FF9F9C244A679BB07B5CF63AA1D8</td>\n",
       "      <td>货物</td>\n",
       "      <td>珠海格力电器股份有限公司</td>\n",
       "      <td>955555.55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>03883E99BA7446BDA6622B5DC496A85D</td>\n",
       "      <td>工程</td>\n",
       "      <td>闪购软件公司</td>\n",
       "      <td>876543.21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>03883E99BA7446BDA6622B5DC496A85D</td>\n",
       "      <td>工程</td>\n",
       "      <td>深圳市国采软件公司</td>\n",
       "      <td>998765.43</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8309</th>\n",
       "      <td>A38C772C3A1E43E880F66721A2359243</td>\n",
       "      <td>货物</td>\n",
       "      <td>云智谷物联网技术（深圳）有限公司</td>\n",
       "      <td>1202235.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8310</th>\n",
       "      <td>A38C772C3A1E43E880F66721A2359243</td>\n",
       "      <td>货物</td>\n",
       "      <td>广州道熙建材有限公司</td>\n",
       "      <td>879329.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8311</th>\n",
       "      <td>10895A88C81C4FD0923CD515E90C66F5</td>\n",
       "      <td>服务</td>\n",
       "      <td>广东知青搬家集团有限公司</td>\n",
       "      <td>1798000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8312</th>\n",
       "      <td>10895A88C81C4FD0923CD515E90C66F5</td>\n",
       "      <td>服务</td>\n",
       "      <td>广州欧玮仪器技术有限公司</td>\n",
       "      <td>1799100.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8313</th>\n",
       "      <td>10895A88C81C4FD0923CD515E90C66F5</td>\n",
       "      <td>服务</td>\n",
       "      <td>广州仪速安电子科技有限公司</td>\n",
       "      <td>1797950.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>8313 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                            project_id purchase_project_type_mean  \\\n",
       "0     7AF0FF9F9C244A679BB07B5CF63AA1D8                         货物   \n",
       "1     7AF0FF9F9C244A679BB07B5CF63AA1D8                         货物   \n",
       "2     7AF0FF9F9C244A679BB07B5CF63AA1D8                         货物   \n",
       "3     03883E99BA7446BDA6622B5DC496A85D                         工程   \n",
       "4     03883E99BA7446BDA6622B5DC496A85D                         工程   \n",
       "...                                ...                        ...   \n",
       "8309  A38C772C3A1E43E880F66721A2359243                         货物   \n",
       "8310  A38C772C3A1E43E880F66721A2359243                         货物   \n",
       "8311  10895A88C81C4FD0923CD515E90C66F5                         服务   \n",
       "8312  10895A88C81C4FD0923CD515E90C66F5                         服务   \n",
       "8313  10895A88C81C4FD0923CD515E90C66F5                         服务   \n",
       "\n",
       "                bidder   bid_price  \n",
       "0               闪购软件公司   777777.77  \n",
       "1      深圳市华为技术有限公司7777   888888.88  \n",
       "2         珠海格力电器股份有限公司   955555.55  \n",
       "3               闪购软件公司   876543.21  \n",
       "4            深圳市国采软件公司   998765.43  \n",
       "...                ...         ...  \n",
       "8309  云智谷物联网技术（深圳）有限公司  1202235.00  \n",
       "8310        广州道熙建材有限公司   879329.00  \n",
       "8311      广东知青搬家集团有限公司  1798000.00  \n",
       "8312      广州欧玮仪器技术有限公司  1799100.00  \n",
       "8313     广州仪速安电子科技有限公司  1797950.00  \n",
       "\n",
       "[8313 rows x 4 columns]"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "result = data.dropna()\n",
    "result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "1bdbb1f4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "False"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.any(pd.isnull(result))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e6352a50",
   "metadata": {},
   "source": [
    "# 填充null值 fillna()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "208c2b3f",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>project_id</th>\n",
       "      <th>purchase_project_type_mean</th>\n",
       "      <th>bidder</th>\n",
       "      <th>bid_price</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>7AF0FF9F9C244A679BB07B5CF63AA1D8</td>\n",
       "      <td>货物</td>\n",
       "      <td>闪购软件公司</td>\n",
       "      <td>777777.77</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>7AF0FF9F9C244A679BB07B5CF63AA1D8</td>\n",
       "      <td>货物</td>\n",
       "      <td>深圳市华为技术有限公司7777</td>\n",
       "      <td>888888.88</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>7AF0FF9F9C244A679BB07B5CF63AA1D8</td>\n",
       "      <td>货物</td>\n",
       "      <td>珠海格力电器股份有限公司</td>\n",
       "      <td>955555.55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>03883E99BA7446BDA6622B5DC496A85D</td>\n",
       "      <td>工程</td>\n",
       "      <td>闪购软件公司</td>\n",
       "      <td>876543.21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>03883E99BA7446BDA6622B5DC496A85D</td>\n",
       "      <td>工程</td>\n",
       "      <td>深圳市国采软件公司</td>\n",
       "      <td>998765.43</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8309</th>\n",
       "      <td>A38C772C3A1E43E880F66721A2359243</td>\n",
       "      <td>货物</td>\n",
       "      <td>云智谷物联网技术（深圳）有限公司</td>\n",
       "      <td>1202235.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8310</th>\n",
       "      <td>A38C772C3A1E43E880F66721A2359243</td>\n",
       "      <td>货物</td>\n",
       "      <td>广州道熙建材有限公司</td>\n",
       "      <td>879329.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8311</th>\n",
       "      <td>10895A88C81C4FD0923CD515E90C66F5</td>\n",
       "      <td>服务</td>\n",
       "      <td>广东知青搬家集团有限公司</td>\n",
       "      <td>1798000.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8312</th>\n",
       "      <td>10895A88C81C4FD0923CD515E90C66F5</td>\n",
       "      <td>服务</td>\n",
       "      <td>广州欧玮仪器技术有限公司</td>\n",
       "      <td>1799100.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8313</th>\n",
       "      <td>10895A88C81C4FD0923CD515E90C66F5</td>\n",
       "      <td>服务</td>\n",
       "      <td>广州仪速安电子科技有限公司</td>\n",
       "      <td>1797950.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>8314 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                            project_id purchase_project_type_mean  \\\n",
       "0     7AF0FF9F9C244A679BB07B5CF63AA1D8                         货物   \n",
       "1     7AF0FF9F9C244A679BB07B5CF63AA1D8                         货物   \n",
       "2     7AF0FF9F9C244A679BB07B5CF63AA1D8                         货物   \n",
       "3     03883E99BA7446BDA6622B5DC496A85D                         工程   \n",
       "4     03883E99BA7446BDA6622B5DC496A85D                         工程   \n",
       "...                                ...                        ...   \n",
       "8309  A38C772C3A1E43E880F66721A2359243                         货物   \n",
       "8310  A38C772C3A1E43E880F66721A2359243                         货物   \n",
       "8311  10895A88C81C4FD0923CD515E90C66F5                         服务   \n",
       "8312  10895A88C81C4FD0923CD515E90C66F5                         服务   \n",
       "8313  10895A88C81C4FD0923CD515E90C66F5                         服务   \n",
       "\n",
       "                bidder   bid_price  \n",
       "0               闪购软件公司   777777.77  \n",
       "1      深圳市华为技术有限公司7777   888888.88  \n",
       "2         珠海格力电器股份有限公司   955555.55  \n",
       "3               闪购软件公司   876543.21  \n",
       "4            深圳市国采软件公司   998765.43  \n",
       "...                ...         ...  \n",
       "8309  云智谷物联网技术（深圳）有限公司  1202235.00  \n",
       "8310        广州道熙建材有限公司   879329.00  \n",
       "8311      广东知青搬家集团有限公司  1798000.00  \n",
       "8312      广州欧玮仪器技术有限公司  1799100.00  \n",
       "8313     广州仪速安电子科技有限公司  1797950.00  \n",
       "\n",
       "[8314 rows x 4 columns]"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 把空值用平均值替换 ， inplace 是否替换原来的数据\n",
    "data['bid_price'].fillna(data['bid_price'].mean(), inplace=True)\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "46ab1d88",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "False"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.any(pd.isnull(data))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "1d4ee697",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 打印有空值的列\n",
    "for i in data.columns:\n",
    "    if np.any(pd.isnull(data[i])) ==True:\n",
    "        print(i)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1c8d5946",
   "metadata": {},
   "source": [
    "# 替换replace()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "89ad17e5",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 把 ？ 替换成空值\n",
    "tmp = data.replace(to_replace='?',value=np.nan)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "932174ee",
   "metadata": {},
   "source": [
    "# 数据离散"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "30ea0268",
   "metadata": {},
   "source": [
    "## qd.qcut(data,组)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "9906899c",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "data2=pd.read_csv('d:/data/tdz_opening_bid_report.csv',usecols=['source_id','purchase_project_type_mean','bidder','bid_price']).set_index('source_id')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "0185efbd",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "source_id\n",
       "1                                        777777.77\n",
       "1                                        888888.88\n",
       "1                                        955555.55\n",
       "2                                        876543.21\n",
       "2                                        998765.43\n",
       "                                           ...    \n",
       "e420faad-b3b9-4405-88a2-5a89fcf4f72c    1202235.00\n",
       "e420faad-b3b9-4405-88a2-5a89fcf4f72c     879329.00\n",
       "9d2d1b97-4b88-4ec7-8595-d946809f30e9    1798000.00\n",
       "9d2d1b97-4b88-4ec7-8595-d946809f30e9    1799100.00\n",
       "9d2d1b97-4b88-4ec7-8595-d946809f30e9    1797950.00\n",
       "Name: bid_price, Length: 8314, dtype: float64"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tmpData = data2['bid_price']\n",
    "tmpData"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "16b71cf7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "source_id\n",
       "1                                              (-0.001, 1020000.0]\n",
       "1                                              (-0.001, 1020000.0]\n",
       "1                                              (-0.001, 1020000.0]\n",
       "2                                              (-0.001, 1020000.0]\n",
       "2                                              (-0.001, 1020000.0]\n",
       "                                                   ...            \n",
       "e420faad-b3b9-4405-88a2-5a89fcf4f72c        (1020000.0, 1498000.0]\n",
       "e420faad-b3b9-4405-88a2-5a89fcf4f72c           (-0.001, 1020000.0]\n",
       "9d2d1b97-4b88-4ec7-8595-d946809f30e9    (1758389.611, 2342809.707]\n",
       "9d2d1b97-4b88-4ec7-8595-d946809f30e9    (1758389.611, 2342809.707]\n",
       "9d2d1b97-4b88-4ec7-8595-d946809f30e9    (1758389.611, 2342809.707]\n",
       "Name: bid_price, Length: 8314, dtype: category\n",
       "Categories (7, interval[float64, right]): [(-0.001, 1020000.0] < (1020000.0, 1498000.0] < (1498000.0, 1758389.611] < (1758389.611, 2342809.707] < (2342809.707, 3247402.537] < (3247402.537, 4876552.81] < (4876552.81, 5453412453.0]]"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "qcut = pd.qcut(tmpData,7)\n",
    "qcut"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "90e291b0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "bid_price\n",
       "(1020000.0, 1498000.0]        1191\n",
       "(-0.001, 1020000.0]           1190\n",
       "(2342809.707, 3247402.537]    1188\n",
       "(4876552.81, 5453412453.0]    1188\n",
       "(1758389.611, 2342809.707]    1187\n",
       "(3247402.537, 4876552.81]     1187\n",
       "(1498000.0, 1758389.611]      1182\n",
       "Name: count, dtype: int64"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 自动生成差不多数量级的类别\n",
    "qcut.value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "07e266a3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "id\n",
       "F4F2593878214D5CBECB56A1F816A848          (0, 1000000]\n",
       "49FD050AF6764CDB99C5F8CFAB3ABD12          (0, 1000000]\n",
       "947DAA5390BA4E2F8E2115D3EC0CD552          (0, 1000000]\n",
       "00C100655F0644878D894738EEC9337D          (0, 1000000]\n",
       "2CE4BD607E294255ACB82D7545E1E746          (0, 1000000]\n",
       "                                           ...        \n",
       "72F4F6EB67B242C28BB52E43E108C73B    (1000000, 3000000]\n",
       "1094A1B795F54BB09497C217143C7BF7          (0, 1000000]\n",
       "64A386E8524C41748719FEB95DB08F31    (1000000, 3000000]\n",
       "E8E642F851CA4D83B951C4CB4191A43D    (1000000, 3000000]\n",
       "DF54715B5B96444FB6B5BCBC18B29177    (1000000, 3000000]\n",
       "Name: bid_price, Length: 8314, dtype: category\n",
       "Categories (7, interval[int64, right]): [(0, 1000000] < (1000000, 3000000] < (3000000, 5000000] < (5000000, 10000000] < (10000000, 50000000] < (50000000, 100000000] < (100000000, 999999999]]"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 自定义组别分组\n",
    "bins = [0,1000000,3000000,5000000,10000000,50000000,100000000,999999999]\n",
    "qcount2=pd.cut(tmpData,bins)\n",
    "qcount2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "e3f38f7a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "bid_price\n",
       "(1000000, 3000000]        4498\n",
       "(3000000, 5000000]        1523\n",
       "(0, 1000000]              1178\n",
       "(5000000, 10000000]        803\n",
       "(10000000, 50000000]       277\n",
       "(100000000, 999999999]      20\n",
       "(50000000, 100000000]       10\n",
       "Name: count, dtype: int64"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "qcount2.value_counts()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "addcc87e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>投标区间_(0, 1000000]</th>\n",
       "      <th>投标区间_(1000000, 3000000]</th>\n",
       "      <th>投标区间_(3000000, 5000000]</th>\n",
       "      <th>投标区间_(5000000, 10000000]</th>\n",
       "      <th>投标区间_(10000000, 50000000]</th>\n",
       "      <th>投标区间_(50000000, 100000000]</th>\n",
       "      <th>投标区间_(100000000, 999999999]</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>id</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>F4F2593878214D5CBECB56A1F816A848</th>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49FD050AF6764CDB99C5F8CFAB3ABD12</th>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>947DAA5390BA4E2F8E2115D3EC0CD552</th>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>00C100655F0644878D894738EEC9337D</th>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2CE4BD607E294255ACB82D7545E1E746</th>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>72F4F6EB67B242C28BB52E43E108C73B</th>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1094A1B795F54BB09497C217143C7BF7</th>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>64A386E8524C41748719FEB95DB08F31</th>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E8E642F851CA4D83B951C4CB4191A43D</th>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>DF54715B5B96444FB6B5BCBC18B29177</th>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>8314 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                  投标区间_(0, 1000000]  投标区间_(1000000, 3000000]  \\\n",
       "id                                                                             \n",
       "F4F2593878214D5CBECB56A1F816A848               True                    False   \n",
       "49FD050AF6764CDB99C5F8CFAB3ABD12               True                    False   \n",
       "947DAA5390BA4E2F8E2115D3EC0CD552               True                    False   \n",
       "00C100655F0644878D894738EEC9337D               True                    False   \n",
       "2CE4BD607E294255ACB82D7545E1E746               True                    False   \n",
       "...                                             ...                      ...   \n",
       "72F4F6EB67B242C28BB52E43E108C73B              False                     True   \n",
       "1094A1B795F54BB09497C217143C7BF7               True                    False   \n",
       "64A386E8524C41748719FEB95DB08F31              False                     True   \n",
       "E8E642F851CA4D83B951C4CB4191A43D              False                     True   \n",
       "DF54715B5B96444FB6B5BCBC18B29177              False                     True   \n",
       "\n",
       "                                  投标区间_(3000000, 5000000]  \\\n",
       "id                                                          \n",
       "F4F2593878214D5CBECB56A1F816A848                    False   \n",
       "49FD050AF6764CDB99C5F8CFAB3ABD12                    False   \n",
       "947DAA5390BA4E2F8E2115D3EC0CD552                    False   \n",
       "00C100655F0644878D894738EEC9337D                    False   \n",
       "2CE4BD607E294255ACB82D7545E1E746                    False   \n",
       "...                                                   ...   \n",
       "72F4F6EB67B242C28BB52E43E108C73B                    False   \n",
       "1094A1B795F54BB09497C217143C7BF7                    False   \n",
       "64A386E8524C41748719FEB95DB08F31                    False   \n",
       "E8E642F851CA4D83B951C4CB4191A43D                    False   \n",
       "DF54715B5B96444FB6B5BCBC18B29177                    False   \n",
       "\n",
       "                                  投标区间_(5000000, 10000000]  \\\n",
       "id                                                           \n",
       "F4F2593878214D5CBECB56A1F816A848                     False   \n",
       "49FD050AF6764CDB99C5F8CFAB3ABD12                     False   \n",
       "947DAA5390BA4E2F8E2115D3EC0CD552                     False   \n",
       "00C100655F0644878D894738EEC9337D                     False   \n",
       "2CE4BD607E294255ACB82D7545E1E746                     False   \n",
       "...                                                    ...   \n",
       "72F4F6EB67B242C28BB52E43E108C73B                     False   \n",
       "1094A1B795F54BB09497C217143C7BF7                     False   \n",
       "64A386E8524C41748719FEB95DB08F31                     False   \n",
       "E8E642F851CA4D83B951C4CB4191A43D                     False   \n",
       "DF54715B5B96444FB6B5BCBC18B29177                     False   \n",
       "\n",
       "                                  投标区间_(10000000, 50000000]  \\\n",
       "id                                                            \n",
       "F4F2593878214D5CBECB56A1F816A848                      False   \n",
       "49FD050AF6764CDB99C5F8CFAB3ABD12                      False   \n",
       "947DAA5390BA4E2F8E2115D3EC0CD552                      False   \n",
       "00C100655F0644878D894738EEC9337D                      False   \n",
       "2CE4BD607E294255ACB82D7545E1E746                      False   \n",
       "...                                                     ...   \n",
       "72F4F6EB67B242C28BB52E43E108C73B                      False   \n",
       "1094A1B795F54BB09497C217143C7BF7                      False   \n",
       "64A386E8524C41748719FEB95DB08F31                      False   \n",
       "E8E642F851CA4D83B951C4CB4191A43D                      False   \n",
       "DF54715B5B96444FB6B5BCBC18B29177                      False   \n",
       "\n",
       "                                  投标区间_(50000000, 100000000]  \\\n",
       "id                                                             \n",
       "F4F2593878214D5CBECB56A1F816A848                       False   \n",
       "49FD050AF6764CDB99C5F8CFAB3ABD12                       False   \n",
       "947DAA5390BA4E2F8E2115D3EC0CD552                       False   \n",
       "00C100655F0644878D894738EEC9337D                       False   \n",
       "2CE4BD607E294255ACB82D7545E1E746                       False   \n",
       "...                                                      ...   \n",
       "72F4F6EB67B242C28BB52E43E108C73B                       False   \n",
       "1094A1B795F54BB09497C217143C7BF7                       False   \n",
       "64A386E8524C41748719FEB95DB08F31                       False   \n",
       "E8E642F851CA4D83B951C4CB4191A43D                       False   \n",
       "DF54715B5B96444FB6B5BCBC18B29177                       False   \n",
       "\n",
       "                                  投标区间_(100000000, 999999999]  \n",
       "id                                                             \n",
       "F4F2593878214D5CBECB56A1F816A848                        False  \n",
       "49FD050AF6764CDB99C5F8CFAB3ABD12                        False  \n",
       "947DAA5390BA4E2F8E2115D3EC0CD552                        False  \n",
       "00C100655F0644878D894738EEC9337D                        False  \n",
       "2CE4BD607E294255ACB82D7545E1E746                        False  \n",
       "...                                                       ...  \n",
       "72F4F6EB67B242C28BB52E43E108C73B                        False  \n",
       "1094A1B795F54BB09497C217143C7BF7                        False  \n",
       "64A386E8524C41748719FEB95DB08F31                        False  \n",
       "E8E642F851CA4D83B951C4CB4191A43D                        False  \n",
       "DF54715B5B96444FB6B5BCBC18B29177                        False  \n",
       "\n",
       "[8314 rows x 7 columns]"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 转换 one-host 编码\n",
    "dummies = pd.get_dummies(qcount2,prefix='投标区间')\n",
    "dummies"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "67b378f9",
   "metadata": {},
   "source": [
    "# 合并数据表格"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "c0daf723",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>project_id</th>\n",
       "      <th>purchase_project_type_mean</th>\n",
       "      <th>bidder</th>\n",
       "      <th>bid_price</th>\n",
       "      <th>投标区间_(0, 1000000]</th>\n",
       "      <th>投标区间_(1000000, 3000000]</th>\n",
       "      <th>投标区间_(3000000, 5000000]</th>\n",
       "      <th>投标区间_(5000000, 10000000]</th>\n",
       "      <th>投标区间_(10000000, 50000000]</th>\n",
       "      <th>投标区间_(50000000, 100000000]</th>\n",
       "      <th>投标区间_(100000000, 999999999]</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>id</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>F4F2593878214D5CBECB56A1F816A848</th>\n",
       "      <td>7AF0FF9F9C244A679BB07B5CF63AA1D8</td>\n",
       "      <td>货物</td>\n",
       "      <td>闪购软件公司</td>\n",
       "      <td>777777.77</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49FD050AF6764CDB99C5F8CFAB3ABD12</th>\n",
       "      <td>7AF0FF9F9C244A679BB07B5CF63AA1D8</td>\n",
       "      <td>货物</td>\n",
       "      <td>深圳市华为技术有限公司7777</td>\n",
       "      <td>888888.88</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>947DAA5390BA4E2F8E2115D3EC0CD552</th>\n",
       "      <td>7AF0FF9F9C244A679BB07B5CF63AA1D8</td>\n",
       "      <td>货物</td>\n",
       "      <td>珠海格力电器股份有限公司</td>\n",
       "      <td>955555.55</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>00C100655F0644878D894738EEC9337D</th>\n",
       "      <td>03883E99BA7446BDA6622B5DC496A85D</td>\n",
       "      <td>工程</td>\n",
       "      <td>闪购软件公司</td>\n",
       "      <td>876543.21</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2CE4BD607E294255ACB82D7545E1E746</th>\n",
       "      <td>03883E99BA7446BDA6622B5DC496A85D</td>\n",
       "      <td>工程</td>\n",
       "      <td>深圳市国采软件公司</td>\n",
       "      <td>998765.43</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>72F4F6EB67B242C28BB52E43E108C73B</th>\n",
       "      <td>A38C772C3A1E43E880F66721A2359243</td>\n",
       "      <td>货物</td>\n",
       "      <td>云智谷物联网技术（深圳）有限公司</td>\n",
       "      <td>1202235.00</td>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1094A1B795F54BB09497C217143C7BF7</th>\n",
       "      <td>A38C772C3A1E43E880F66721A2359243</td>\n",
       "      <td>货物</td>\n",
       "      <td>广州道熙建材有限公司</td>\n",
       "      <td>879329.00</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>64A386E8524C41748719FEB95DB08F31</th>\n",
       "      <td>10895A88C81C4FD0923CD515E90C66F5</td>\n",
       "      <td>服务</td>\n",
       "      <td>广东知青搬家集团有限公司</td>\n",
       "      <td>1798000.00</td>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E8E642F851CA4D83B951C4CB4191A43D</th>\n",
       "      <td>10895A88C81C4FD0923CD515E90C66F5</td>\n",
       "      <td>服务</td>\n",
       "      <td>广州欧玮仪器技术有限公司</td>\n",
       "      <td>1799100.00</td>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>DF54715B5B96444FB6B5BCBC18B29177</th>\n",
       "      <td>10895A88C81C4FD0923CD515E90C66F5</td>\n",
       "      <td>服务</td>\n",
       "      <td>广州仪速安电子科技有限公司</td>\n",
       "      <td>1797950.00</td>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>8314 rows × 11 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                        project_id  \\\n",
       "id                                                                   \n",
       "F4F2593878214D5CBECB56A1F816A848  7AF0FF9F9C244A679BB07B5CF63AA1D8   \n",
       "49FD050AF6764CDB99C5F8CFAB3ABD12  7AF0FF9F9C244A679BB07B5CF63AA1D8   \n",
       "947DAA5390BA4E2F8E2115D3EC0CD552  7AF0FF9F9C244A679BB07B5CF63AA1D8   \n",
       "00C100655F0644878D894738EEC9337D  03883E99BA7446BDA6622B5DC496A85D   \n",
       "2CE4BD607E294255ACB82D7545E1E746  03883E99BA7446BDA6622B5DC496A85D   \n",
       "...                                                            ...   \n",
       "72F4F6EB67B242C28BB52E43E108C73B  A38C772C3A1E43E880F66721A2359243   \n",
       "1094A1B795F54BB09497C217143C7BF7  A38C772C3A1E43E880F66721A2359243   \n",
       "64A386E8524C41748719FEB95DB08F31  10895A88C81C4FD0923CD515E90C66F5   \n",
       "E8E642F851CA4D83B951C4CB4191A43D  10895A88C81C4FD0923CD515E90C66F5   \n",
       "DF54715B5B96444FB6B5BCBC18B29177  10895A88C81C4FD0923CD515E90C66F5   \n",
       "\n",
       "                                 purchase_project_type_mean            bidder  \\\n",
       "id                                                                              \n",
       "F4F2593878214D5CBECB56A1F816A848                         货物            闪购软件公司   \n",
       "49FD050AF6764CDB99C5F8CFAB3ABD12                         货物   深圳市华为技术有限公司7777   \n",
       "947DAA5390BA4E2F8E2115D3EC0CD552                         货物      珠海格力电器股份有限公司   \n",
       "00C100655F0644878D894738EEC9337D                         工程            闪购软件公司   \n",
       "2CE4BD607E294255ACB82D7545E1E746                         工程         深圳市国采软件公司   \n",
       "...                                                     ...               ...   \n",
       "72F4F6EB67B242C28BB52E43E108C73B                         货物  云智谷物联网技术（深圳）有限公司   \n",
       "1094A1B795F54BB09497C217143C7BF7                         货物        广州道熙建材有限公司   \n",
       "64A386E8524C41748719FEB95DB08F31                         服务      广东知青搬家集团有限公司   \n",
       "E8E642F851CA4D83B951C4CB4191A43D                         服务      广州欧玮仪器技术有限公司   \n",
       "DF54715B5B96444FB6B5BCBC18B29177                         服务     广州仪速安电子科技有限公司   \n",
       "\n",
       "                                   bid_price  投标区间_(0, 1000000]  \\\n",
       "id                                                                \n",
       "F4F2593878214D5CBECB56A1F816A848   777777.77               True   \n",
       "49FD050AF6764CDB99C5F8CFAB3ABD12   888888.88               True   \n",
       "947DAA5390BA4E2F8E2115D3EC0CD552   955555.55               True   \n",
       "00C100655F0644878D894738EEC9337D   876543.21               True   \n",
       "2CE4BD607E294255ACB82D7545E1E746   998765.43               True   \n",
       "...                                      ...                ...   \n",
       "72F4F6EB67B242C28BB52E43E108C73B  1202235.00              False   \n",
       "1094A1B795F54BB09497C217143C7BF7   879329.00               True   \n",
       "64A386E8524C41748719FEB95DB08F31  1798000.00              False   \n",
       "E8E642F851CA4D83B951C4CB4191A43D  1799100.00              False   \n",
       "DF54715B5B96444FB6B5BCBC18B29177  1797950.00              False   \n",
       "\n",
       "                                  投标区间_(1000000, 3000000]  \\\n",
       "id                                                          \n",
       "F4F2593878214D5CBECB56A1F816A848                    False   \n",
       "49FD050AF6764CDB99C5F8CFAB3ABD12                    False   \n",
       "947DAA5390BA4E2F8E2115D3EC0CD552                    False   \n",
       "00C100655F0644878D894738EEC9337D                    False   \n",
       "2CE4BD607E294255ACB82D7545E1E746                    False   \n",
       "...                                                   ...   \n",
       "72F4F6EB67B242C28BB52E43E108C73B                     True   \n",
       "1094A1B795F54BB09497C217143C7BF7                    False   \n",
       "64A386E8524C41748719FEB95DB08F31                     True   \n",
       "E8E642F851CA4D83B951C4CB4191A43D                     True   \n",
       "DF54715B5B96444FB6B5BCBC18B29177                     True   \n",
       "\n",
       "                                  投标区间_(3000000, 5000000]  \\\n",
       "id                                                          \n",
       "F4F2593878214D5CBECB56A1F816A848                    False   \n",
       "49FD050AF6764CDB99C5F8CFAB3ABD12                    False   \n",
       "947DAA5390BA4E2F8E2115D3EC0CD552                    False   \n",
       "00C100655F0644878D894738EEC9337D                    False   \n",
       "2CE4BD607E294255ACB82D7545E1E746                    False   \n",
       "...                                                   ...   \n",
       "72F4F6EB67B242C28BB52E43E108C73B                    False   \n",
       "1094A1B795F54BB09497C217143C7BF7                    False   \n",
       "64A386E8524C41748719FEB95DB08F31                    False   \n",
       "E8E642F851CA4D83B951C4CB4191A43D                    False   \n",
       "DF54715B5B96444FB6B5BCBC18B29177                    False   \n",
       "\n",
       "                                  投标区间_(5000000, 10000000]  \\\n",
       "id                                                           \n",
       "F4F2593878214D5CBECB56A1F816A848                     False   \n",
       "49FD050AF6764CDB99C5F8CFAB3ABD12                     False   \n",
       "947DAA5390BA4E2F8E2115D3EC0CD552                     False   \n",
       "00C100655F0644878D894738EEC9337D                     False   \n",
       "2CE4BD607E294255ACB82D7545E1E746                     False   \n",
       "...                                                    ...   \n",
       "72F4F6EB67B242C28BB52E43E108C73B                     False   \n",
       "1094A1B795F54BB09497C217143C7BF7                     False   \n",
       "64A386E8524C41748719FEB95DB08F31                     False   \n",
       "E8E642F851CA4D83B951C4CB4191A43D                     False   \n",
       "DF54715B5B96444FB6B5BCBC18B29177                     False   \n",
       "\n",
       "                                  投标区间_(10000000, 50000000]  \\\n",
       "id                                                            \n",
       "F4F2593878214D5CBECB56A1F816A848                      False   \n",
       "49FD050AF6764CDB99C5F8CFAB3ABD12                      False   \n",
       "947DAA5390BA4E2F8E2115D3EC0CD552                      False   \n",
       "00C100655F0644878D894738EEC9337D                      False   \n",
       "2CE4BD607E294255ACB82D7545E1E746                      False   \n",
       "...                                                     ...   \n",
       "72F4F6EB67B242C28BB52E43E108C73B                      False   \n",
       "1094A1B795F54BB09497C217143C7BF7                      False   \n",
       "64A386E8524C41748719FEB95DB08F31                      False   \n",
       "E8E642F851CA4D83B951C4CB4191A43D                      False   \n",
       "DF54715B5B96444FB6B5BCBC18B29177                      False   \n",
       "\n",
       "                                  投标区间_(50000000, 100000000]  \\\n",
       "id                                                             \n",
       "F4F2593878214D5CBECB56A1F816A848                       False   \n",
       "49FD050AF6764CDB99C5F8CFAB3ABD12                       False   \n",
       "947DAA5390BA4E2F8E2115D3EC0CD552                       False   \n",
       "00C100655F0644878D894738EEC9337D                       False   \n",
       "2CE4BD607E294255ACB82D7545E1E746                       False   \n",
       "...                                                      ...   \n",
       "72F4F6EB67B242C28BB52E43E108C73B                       False   \n",
       "1094A1B795F54BB09497C217143C7BF7                       False   \n",
       "64A386E8524C41748719FEB95DB08F31                       False   \n",
       "E8E642F851CA4D83B951C4CB4191A43D                       False   \n",
       "DF54715B5B96444FB6B5BCBC18B29177                       False   \n",
       "\n",
       "                                  投标区间_(100000000, 999999999]  \n",
       "id                                                             \n",
       "F4F2593878214D5CBECB56A1F816A848                        False  \n",
       "49FD050AF6764CDB99C5F8CFAB3ABD12                        False  \n",
       "947DAA5390BA4E2F8E2115D3EC0CD552                        False  \n",
       "00C100655F0644878D894738EEC9337D                        False  \n",
       "2CE4BD607E294255ACB82D7545E1E746                        False  \n",
       "...                                                       ...  \n",
       "72F4F6EB67B242C28BB52E43E108C73B                        False  \n",
       "1094A1B795F54BB09497C217143C7BF7                        False  \n",
       "64A386E8524C41748719FEB95DB08F31                        False  \n",
       "E8E642F851CA4D83B951C4CB4191A43D                        False  \n",
       "DF54715B5B96444FB6B5BCBC18B29177                        False  \n",
       "\n",
       "[8314 rows x 11 columns]"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# axis 0:列，1：行，默认0\n",
    "pd.concat([data2,dummies] ,axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "id": "23874764",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>project_id</th>\n",
       "      <th>source_id</th>\n",
       "      <th>system_id</th>\n",
       "      <th>system_name</th>\n",
       "      <th>purchase_project_name</th>\n",
       "      <th>purchase_project_code</th>\n",
       "      <th>purchase_project_type</th>\n",
       "      <th>purchase_project_type_mean</th>\n",
       "      <th>contactor</th>\n",
       "      <th>contact_information</th>\n",
       "      <th>...</th>\n",
       "      <th>status_mean</th>\n",
       "      <th>data_create_time</th>\n",
       "      <th>data_modify_time</th>\n",
       "      <th>is_two_envelope</th>\n",
       "      <th>is_two_envelope_mean</th>\n",
       "      <th>is_dark</th>\n",
       "      <th>is_dark_mean</th>\n",
       "      <th>judge_way</th>\n",
       "      <th>judge_way_name</th>\n",
       "      <th>type_flag</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>54CCF6E5AC9E46A482EC900AB81E6F86</td>\n",
       "      <td>98f5af2e-8f9e-4177-986b-beb1be6bfdb0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>中山电子招投标系统</td>\n",
       "      <td>公开招标-委托代理机构-20210916-01</td>\n",
       "      <td>中大招（工）2021-0916号</td>\n",
       "      <td>B</td>\n",
       "      <td>工程类</td>\n",
       "      <td>游舒萍</td>\n",
       "      <td>13760330460</td>\n",
       "      <td>...</td>\n",
       "      <td>数据有效</td>\n",
       "      <td>16/9/2021 10:34:20</td>\n",
       "      <td>16/9/2021 10:34:20</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2</td>\n",
       "      <td>综合评分法</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>18167E7079C140A2A61F81059E9DFA1B</td>\n",
       "      <td>0ae40d89-e220-428e-b468-a18827499517</td>\n",
       "      <td>NaN</td>\n",
       "      <td>中山电子招投标系统</td>\n",
       "      <td>中山大学精准医学科学中心服务器及网络设备采购项目</td>\n",
       "      <td>中大招（货）[2019]303号</td>\n",
       "      <td>A</td>\n",
       "      <td>货物类</td>\n",
       "      <td>lzw</td>\n",
       "      <td>020-84115085</td>\n",
       "      <td>...</td>\n",
       "      <td>数据有效</td>\n",
       "      <td>16/9/2021 11:05:20</td>\n",
       "      <td>16/9/2021 11:05:20</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2</td>\n",
       "      <td>综合评分法</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>5E06739D7B9D424C894820065BB7F2A1</td>\n",
       "      <td>84929838-3d94-4193-96f7-6a29ff8b73f7</td>\n",
       "      <td>NaN</td>\n",
       "      <td>中山电子招投标系统</td>\n",
       "      <td>中山大学广州校区南校园中山楼一期网络布线系统改造采购项目</td>\n",
       "      <td>中大招（服）[2019]072号</td>\n",
       "      <td>C</td>\n",
       "      <td>服务类</td>\n",
       "      <td>lzw</td>\n",
       "      <td>020-84115085</td>\n",
       "      <td>...</td>\n",
       "      <td>数据有效</td>\n",
       "      <td>16/9/2021 11:57:27</td>\n",
       "      <td>16/9/2021 11:57:27</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2</td>\n",
       "      <td>综合评分法</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>89BA79F769C34A388E2ED77BD13DBB24</td>\n",
       "      <td>cf2a05b6-191f-49b2-8568-5e863f8b7e03</td>\n",
       "      <td>NaN</td>\n",
       "      <td>中山电子招投标系统</td>\n",
       "      <td>中山大学2021年南校园474栋中山楼南侧生态停车场改造工程</td>\n",
       "      <td>中大招（工） [2021]014 号</td>\n",
       "      <td>B</td>\n",
       "      <td>工程类</td>\n",
       "      <td>陶亮</td>\n",
       "      <td>13710639056</td>\n",
       "      <td>...</td>\n",
       "      <td>数据有效</td>\n",
       "      <td>16/9/2021 15:21:41</td>\n",
       "      <td>16/9/2021 15:24:05</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2</td>\n",
       "      <td>综合评分法</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>9F1C9DE4BB0E423CAA7BC1226E1B0BB0</td>\n",
       "      <td>ee05b9e4-a63c-4d08-8832-bccb2ff1e0ab</td>\n",
       "      <td>NaN</td>\n",
       "      <td>中山电子招投标系统</td>\n",
       "      <td>中山大学2021年南校园474栋中山楼南侧生态停车场改造工程</td>\n",
       "      <td>中大招（工） [2021]014 号</td>\n",
       "      <td>B</td>\n",
       "      <td>工程类</td>\n",
       "      <td>陶亮</td>\n",
       "      <td>13710639056</td>\n",
       "      <td>...</td>\n",
       "      <td>数据有效</td>\n",
       "      <td>16/9/2021 17:20:48</td>\n",
       "      <td>16/9/2021 17:31:11</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2</td>\n",
       "      <td>综合评分法</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1229</th>\n",
       "      <td>96824E1963C04305ABFB75B95C85EDFE</td>\n",
       "      <td>20153f94-a8ed-4726-ae45-209db635c34b</td>\n",
       "      <td>NaN</td>\n",
       "      <td>中山电子招投标系统</td>\n",
       "      <td>中山大学广州校区南校园与东校园教学楼空调更换采购项目</td>\n",
       "      <td>中大招（货）[2023]124号</td>\n",
       "      <td>A</td>\n",
       "      <td>货物类</td>\n",
       "      <td>范华平</td>\n",
       "      <td>020-84115089</td>\n",
       "      <td>...</td>\n",
       "      <td>数据有效</td>\n",
       "      <td>1/8/2023 09:30:54</td>\n",
       "      <td>1/8/2023 09:30:59</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2</td>\n",
       "      <td>综合评分法</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1230</th>\n",
       "      <td>B74AAA60221C4E26A4977D0BADC23280</td>\n",
       "      <td>23049233-cd8c-4ab8-9ee4-c4a8b9f38e5b</td>\n",
       "      <td>NaN</td>\n",
       "      <td>中山电子招投标系统</td>\n",
       "      <td>中山大学南校园怡乐路教师公寓网络设备采购项目</td>\n",
       "      <td>中大招（货）[2023]115号</td>\n",
       "      <td>A</td>\n",
       "      <td>货物类</td>\n",
       "      <td>范华平</td>\n",
       "      <td>020-84115085</td>\n",
       "      <td>...</td>\n",
       "      <td>数据有效</td>\n",
       "      <td>4/8/2023 09:30:29</td>\n",
       "      <td>4/8/2023 09:30:29</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2</td>\n",
       "      <td>综合评分法</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1231</th>\n",
       "      <td>74AF8C1818AD406A96F959103BA0946D</td>\n",
       "      <td>8a030df8-54bc-47e1-be32-b7d1b4108758</td>\n",
       "      <td>NaN</td>\n",
       "      <td>中山电子招投标系统</td>\n",
       "      <td>中山大学广州校区南校园黄铭衍堂黄传经堂林护堂课室改造项目之多媒体及标准化考场设备采购项目</td>\n",
       "      <td>中大招（货）[2023]101号</td>\n",
       "      <td>A</td>\n",
       "      <td>货物类</td>\n",
       "      <td>李亚珍</td>\n",
       "      <td>18902235313</td>\n",
       "      <td>...</td>\n",
       "      <td>数据有效</td>\n",
       "      <td>10/8/2023 09:30:16</td>\n",
       "      <td>10/8/2023 09:30:18</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2</td>\n",
       "      <td>综合评分法</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1232</th>\n",
       "      <td>A38C772C3A1E43E880F66721A2359243</td>\n",
       "      <td>e420faad-b3b9-4405-88a2-5a89fcf4f72c</td>\n",
       "      <td>NaN</td>\n",
       "      <td>中山电子招投标系统</td>\n",
       "      <td>中山大学五校园消防器材采购项目</td>\n",
       "      <td>中大招（货）[2023]069号</td>\n",
       "      <td>A</td>\n",
       "      <td>货物类</td>\n",
       "      <td>李艳媚</td>\n",
       "      <td>020-84115091</td>\n",
       "      <td>...</td>\n",
       "      <td>数据有效</td>\n",
       "      <td>10/8/2023 09:30:43</td>\n",
       "      <td>10/8/2023 09:30:43</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2</td>\n",
       "      <td>综合评分法</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1233</th>\n",
       "      <td>10895A88C81C4FD0923CD515E90C66F5</td>\n",
       "      <td>9d2d1b97-4b88-4ec7-8595-d946809f30e9</td>\n",
       "      <td>NaN</td>\n",
       "      <td>中山电子招投标系统</td>\n",
       "      <td>中山大学2023年北校园公共卫生学院科研实验室搬迁服务采购项目</td>\n",
       "      <td>中大招（服）[2023]127号</td>\n",
       "      <td>C</td>\n",
       "      <td>服务类</td>\n",
       "      <td>李亚珍</td>\n",
       "      <td>020-84115091</td>\n",
       "      <td>...</td>\n",
       "      <td>数据有效</td>\n",
       "      <td>18/8/2023 09:31:09</td>\n",
       "      <td>18/8/2023 09:31:09</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2</td>\n",
       "      <td>综合评分法</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1234 rows × 41 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                            project_id                             source_id  \\\n",
       "0     54CCF6E5AC9E46A482EC900AB81E6F86  98f5af2e-8f9e-4177-986b-beb1be6bfdb0   \n",
       "1     18167E7079C140A2A61F81059E9DFA1B  0ae40d89-e220-428e-b468-a18827499517   \n",
       "2     5E06739D7B9D424C894820065BB7F2A1  84929838-3d94-4193-96f7-6a29ff8b73f7   \n",
       "3     89BA79F769C34A388E2ED77BD13DBB24  cf2a05b6-191f-49b2-8568-5e863f8b7e03   \n",
       "4     9F1C9DE4BB0E423CAA7BC1226E1B0BB0  ee05b9e4-a63c-4d08-8832-bccb2ff1e0ab   \n",
       "...                                ...                                   ...   \n",
       "1229  96824E1963C04305ABFB75B95C85EDFE  20153f94-a8ed-4726-ae45-209db635c34b   \n",
       "1230  B74AAA60221C4E26A4977D0BADC23280  23049233-cd8c-4ab8-9ee4-c4a8b9f38e5b   \n",
       "1231  74AF8C1818AD406A96F959103BA0946D  8a030df8-54bc-47e1-be32-b7d1b4108758   \n",
       "1232  A38C772C3A1E43E880F66721A2359243  e420faad-b3b9-4405-88a2-5a89fcf4f72c   \n",
       "1233  10895A88C81C4FD0923CD515E90C66F5  9d2d1b97-4b88-4ec7-8595-d946809f30e9   \n",
       "\n",
       "      system_id system_name                         purchase_project_name  \\\n",
       "0           NaN   中山电子招投标系统                       公开招标-委托代理机构-20210916-01   \n",
       "1           NaN   中山电子招投标系统                      中山大学精准医学科学中心服务器及网络设备采购项目   \n",
       "2           NaN   中山电子招投标系统                  中山大学广州校区南校园中山楼一期网络布线系统改造采购项目   \n",
       "3           NaN   中山电子招投标系统                中山大学2021年南校园474栋中山楼南侧生态停车场改造工程   \n",
       "4           NaN   中山电子招投标系统                中山大学2021年南校园474栋中山楼南侧生态停车场改造工程   \n",
       "...         ...         ...                                           ...   \n",
       "1229        NaN   中山电子招投标系统                    中山大学广州校区南校园与东校园教学楼空调更换采购项目   \n",
       "1230        NaN   中山电子招投标系统                        中山大学南校园怡乐路教师公寓网络设备采购项目   \n",
       "1231        NaN   中山电子招投标系统  中山大学广州校区南校园黄铭衍堂黄传经堂林护堂课室改造项目之多媒体及标准化考场设备采购项目   \n",
       "1232        NaN   中山电子招投标系统                               中山大学五校园消防器材采购项目   \n",
       "1233        NaN   中山电子招投标系统               中山大学2023年北校园公共卫生学院科研实验室搬迁服务采购项目   \n",
       "\n",
       "     purchase_project_code purchase_project_type purchase_project_type_mean  \\\n",
       "0         中大招（工）2021-0916号                     B                        工程类   \n",
       "1         中大招（货）[2019]303号                     A                        货物类   \n",
       "2         中大招（服）[2019]072号                     C                        服务类   \n",
       "3       中大招（工） [2021]014 号                     B                        工程类   \n",
       "4       中大招（工） [2021]014 号                     B                        工程类   \n",
       "...                    ...                   ...                        ...   \n",
       "1229      中大招（货）[2023]124号                     A                        货物类   \n",
       "1230      中大招（货）[2023]115号                     A                        货物类   \n",
       "1231      中大招（货）[2023]101号                     A                        货物类   \n",
       "1232      中大招（货）[2023]069号                     A                        货物类   \n",
       "1233      中大招（服）[2023]127号                     C                        服务类   \n",
       "\n",
       "     contactor contact_information  ...  status_mean    data_create_time  \\\n",
       "0          游舒萍         13760330460  ...         数据有效  16/9/2021 10:34:20   \n",
       "1          lzw        020-84115085  ...         数据有效  16/9/2021 11:05:20   \n",
       "2          lzw        020-84115085  ...         数据有效  16/9/2021 11:57:27   \n",
       "3           陶亮         13710639056  ...         数据有效  16/9/2021 15:21:41   \n",
       "4           陶亮         13710639056  ...         数据有效  16/9/2021 17:20:48   \n",
       "...        ...                 ...  ...          ...                 ...   \n",
       "1229       范华平        020-84115089  ...         数据有效   1/8/2023 09:30:54   \n",
       "1230       范华平        020-84115085  ...         数据有效   4/8/2023 09:30:29   \n",
       "1231       李亚珍         18902235313  ...         数据有效  10/8/2023 09:30:16   \n",
       "1232       李艳媚        020-84115091  ...         数据有效  10/8/2023 09:30:43   \n",
       "1233       李亚珍        020-84115091  ...         数据有效  18/8/2023 09:31:09   \n",
       "\n",
       "        data_modify_time  is_two_envelope is_two_envelope_mean  is_dark  \\\n",
       "0     16/9/2021 10:34:20              NaN                  NaN      NaN   \n",
       "1     16/9/2021 11:05:20              NaN                  NaN      NaN   \n",
       "2     16/9/2021 11:57:27              NaN                  NaN      NaN   \n",
       "3     16/9/2021 15:24:05              NaN                  NaN      NaN   \n",
       "4     16/9/2021 17:31:11              NaN                  NaN      NaN   \n",
       "...                  ...              ...                  ...      ...   \n",
       "1229   1/8/2023 09:30:59              NaN                  NaN      NaN   \n",
       "1230   4/8/2023 09:30:29              NaN                  NaN      NaN   \n",
       "1231  10/8/2023 09:30:18              NaN                  NaN      NaN   \n",
       "1232  10/8/2023 09:30:43              NaN                  NaN      NaN   \n",
       "1233  18/8/2023 09:31:09              NaN                  NaN      NaN   \n",
       "\n",
       "      is_dark_mean  judge_way  judge_way_name type_flag  \n",
       "0              NaN          2           综合评分法       NaN  \n",
       "1              NaN          2           综合评分法       NaN  \n",
       "2              NaN          2           综合评分法       NaN  \n",
       "3              NaN          2           综合评分法       NaN  \n",
       "4              NaN          2           综合评分法       NaN  \n",
       "...            ...        ...             ...       ...  \n",
       "1229           NaN          2           综合评分法       NaN  \n",
       "1230           NaN          2           综合评分法       NaN  \n",
       "1231           NaN          2           综合评分法       NaN  \n",
       "1232           NaN          2           综合评分法       NaN  \n",
       "1233           NaN          2           综合评分法       NaN  \n",
       "\n",
       "[1234 rows x 41 columns]"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "projectInfo=pd.read_csv('d:/data/tdz_project_info.csv')\n",
    "projectInfo"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "95e8d33b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>project_id</th>\n",
       "      <th>purchase_project_type_mean_x</th>\n",
       "      <th>bidder</th>\n",
       "      <th>bid_price</th>\n",
       "      <th>source_id</th>\n",
       "      <th>system_id</th>\n",
       "      <th>system_name</th>\n",
       "      <th>purchase_project_name</th>\n",
       "      <th>purchase_project_code</th>\n",
       "      <th>purchase_project_type</th>\n",
       "      <th>...</th>\n",
       "      <th>status_mean</th>\n",
       "      <th>data_create_time</th>\n",
       "      <th>data_modify_time</th>\n",
       "      <th>is_two_envelope</th>\n",
       "      <th>is_two_envelope_mean</th>\n",
       "      <th>is_dark</th>\n",
       "      <th>is_dark_mean</th>\n",
       "      <th>judge_way</th>\n",
       "      <th>judge_way_name</th>\n",
       "      <th>type_flag</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>7AF0FF9F9C244A679BB07B5CF63AA1D8</td>\n",
       "      <td>货物</td>\n",
       "      <td>闪购软件公司</td>\n",
       "      <td>777777.77</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>7AF0FF9F9C244A679BB07B5CF63AA1D8</td>\n",
       "      <td>货物</td>\n",
       "      <td>深圳市华为技术有限公司7777</td>\n",
       "      <td>888888.88</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>7AF0FF9F9C244A679BB07B5CF63AA1D8</td>\n",
       "      <td>货物</td>\n",
       "      <td>珠海格力电器股份有限公司</td>\n",
       "      <td>955555.55</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>03883E99BA7446BDA6622B5DC496A85D</td>\n",
       "      <td>工程</td>\n",
       "      <td>闪购软件公司</td>\n",
       "      <td>876543.21</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>03883E99BA7446BDA6622B5DC496A85D</td>\n",
       "      <td>工程</td>\n",
       "      <td>深圳市国采软件公司</td>\n",
       "      <td>998765.43</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8309</th>\n",
       "      <td>A38C772C3A1E43E880F66721A2359243</td>\n",
       "      <td>货物</td>\n",
       "      <td>云智谷物联网技术（深圳）有限公司</td>\n",
       "      <td>1202235.00</td>\n",
       "      <td>e420faad-b3b9-4405-88a2-5a89fcf4f72c</td>\n",
       "      <td>NaN</td>\n",
       "      <td>中山电子招投标系统</td>\n",
       "      <td>中山大学五校园消防器材采购项目</td>\n",
       "      <td>中大招（货）[2023]069号</td>\n",
       "      <td>A</td>\n",
       "      <td>...</td>\n",
       "      <td>数据有效</td>\n",
       "      <td>10/8/2023 09:30:43</td>\n",
       "      <td>10/8/2023 09:30:43</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.0</td>\n",
       "      <td>综合评分法</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8310</th>\n",
       "      <td>A38C772C3A1E43E880F66721A2359243</td>\n",
       "      <td>货物</td>\n",
       "      <td>广州道熙建材有限公司</td>\n",
       "      <td>879329.00</td>\n",
       "      <td>e420faad-b3b9-4405-88a2-5a89fcf4f72c</td>\n",
       "      <td>NaN</td>\n",
       "      <td>中山电子招投标系统</td>\n",
       "      <td>中山大学五校园消防器材采购项目</td>\n",
       "      <td>中大招（货）[2023]069号</td>\n",
       "      <td>A</td>\n",
       "      <td>...</td>\n",
       "      <td>数据有效</td>\n",
       "      <td>10/8/2023 09:30:43</td>\n",
       "      <td>10/8/2023 09:30:43</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.0</td>\n",
       "      <td>综合评分法</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8311</th>\n",
       "      <td>10895A88C81C4FD0923CD515E90C66F5</td>\n",
       "      <td>服务</td>\n",
       "      <td>广东知青搬家集团有限公司</td>\n",
       "      <td>1798000.00</td>\n",
       "      <td>9d2d1b97-4b88-4ec7-8595-d946809f30e9</td>\n",
       "      <td>NaN</td>\n",
       "      <td>中山电子招投标系统</td>\n",
       "      <td>中山大学2023年北校园公共卫生学院科研实验室搬迁服务采购项目</td>\n",
       "      <td>中大招（服）[2023]127号</td>\n",
       "      <td>C</td>\n",
       "      <td>...</td>\n",
       "      <td>数据有效</td>\n",
       "      <td>18/8/2023 09:31:09</td>\n",
       "      <td>18/8/2023 09:31:09</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.0</td>\n",
       "      <td>综合评分法</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8312</th>\n",
       "      <td>10895A88C81C4FD0923CD515E90C66F5</td>\n",
       "      <td>服务</td>\n",
       "      <td>广州欧玮仪器技术有限公司</td>\n",
       "      <td>1799100.00</td>\n",
       "      <td>9d2d1b97-4b88-4ec7-8595-d946809f30e9</td>\n",
       "      <td>NaN</td>\n",
       "      <td>中山电子招投标系统</td>\n",
       "      <td>中山大学2023年北校园公共卫生学院科研实验室搬迁服务采购项目</td>\n",
       "      <td>中大招（服）[2023]127号</td>\n",
       "      <td>C</td>\n",
       "      <td>...</td>\n",
       "      <td>数据有效</td>\n",
       "      <td>18/8/2023 09:31:09</td>\n",
       "      <td>18/8/2023 09:31:09</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.0</td>\n",
       "      <td>综合评分法</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8313</th>\n",
       "      <td>10895A88C81C4FD0923CD515E90C66F5</td>\n",
       "      <td>服务</td>\n",
       "      <td>广州仪速安电子科技有限公司</td>\n",
       "      <td>1797950.00</td>\n",
       "      <td>9d2d1b97-4b88-4ec7-8595-d946809f30e9</td>\n",
       "      <td>NaN</td>\n",
       "      <td>中山电子招投标系统</td>\n",
       "      <td>中山大学2023年北校园公共卫生学院科研实验室搬迁服务采购项目</td>\n",
       "      <td>中大招（服）[2023]127号</td>\n",
       "      <td>C</td>\n",
       "      <td>...</td>\n",
       "      <td>数据有效</td>\n",
       "      <td>18/8/2023 09:31:09</td>\n",
       "      <td>18/8/2023 09:31:09</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.0</td>\n",
       "      <td>综合评分法</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>8314 rows × 44 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                            project_id purchase_project_type_mean_x  \\\n",
       "0     7AF0FF9F9C244A679BB07B5CF63AA1D8                           货物   \n",
       "1     7AF0FF9F9C244A679BB07B5CF63AA1D8                           货物   \n",
       "2     7AF0FF9F9C244A679BB07B5CF63AA1D8                           货物   \n",
       "3     03883E99BA7446BDA6622B5DC496A85D                           工程   \n",
       "4     03883E99BA7446BDA6622B5DC496A85D                           工程   \n",
       "...                                ...                          ...   \n",
       "8309  A38C772C3A1E43E880F66721A2359243                           货物   \n",
       "8310  A38C772C3A1E43E880F66721A2359243                           货物   \n",
       "8311  10895A88C81C4FD0923CD515E90C66F5                           服务   \n",
       "8312  10895A88C81C4FD0923CD515E90C66F5                           服务   \n",
       "8313  10895A88C81C4FD0923CD515E90C66F5                           服务   \n",
       "\n",
       "                bidder   bid_price                             source_id  \\\n",
       "0               闪购软件公司   777777.77                                   NaN   \n",
       "1      深圳市华为技术有限公司7777   888888.88                                   NaN   \n",
       "2         珠海格力电器股份有限公司   955555.55                                   NaN   \n",
       "3               闪购软件公司   876543.21                                   NaN   \n",
       "4            深圳市国采软件公司   998765.43                                   NaN   \n",
       "...                ...         ...                                   ...   \n",
       "8309  云智谷物联网技术（深圳）有限公司  1202235.00  e420faad-b3b9-4405-88a2-5a89fcf4f72c   \n",
       "8310        广州道熙建材有限公司   879329.00  e420faad-b3b9-4405-88a2-5a89fcf4f72c   \n",
       "8311      广东知青搬家集团有限公司  1798000.00  9d2d1b97-4b88-4ec7-8595-d946809f30e9   \n",
       "8312      广州欧玮仪器技术有限公司  1799100.00  9d2d1b97-4b88-4ec7-8595-d946809f30e9   \n",
       "8313     广州仪速安电子科技有限公司  1797950.00  9d2d1b97-4b88-4ec7-8595-d946809f30e9   \n",
       "\n",
       "      system_id system_name            purchase_project_name  \\\n",
       "0           NaN         NaN                              NaN   \n",
       "1           NaN         NaN                              NaN   \n",
       "2           NaN         NaN                              NaN   \n",
       "3           NaN         NaN                              NaN   \n",
       "4           NaN         NaN                              NaN   \n",
       "...         ...         ...                              ...   \n",
       "8309        NaN   中山电子招投标系统                  中山大学五校园消防器材采购项目   \n",
       "8310        NaN   中山电子招投标系统                  中山大学五校园消防器材采购项目   \n",
       "8311        NaN   中山电子招投标系统  中山大学2023年北校园公共卫生学院科研实验室搬迁服务采购项目   \n",
       "8312        NaN   中山电子招投标系统  中山大学2023年北校园公共卫生学院科研实验室搬迁服务采购项目   \n",
       "8313        NaN   中山电子招投标系统  中山大学2023年北校园公共卫生学院科研实验室搬迁服务采购项目   \n",
       "\n",
       "     purchase_project_code purchase_project_type  ... status_mean  \\\n",
       "0                      NaN                   NaN  ...         NaN   \n",
       "1                      NaN                   NaN  ...         NaN   \n",
       "2                      NaN                   NaN  ...         NaN   \n",
       "3                      NaN                   NaN  ...         NaN   \n",
       "4                      NaN                   NaN  ...         NaN   \n",
       "...                    ...                   ...  ...         ...   \n",
       "8309      中大招（货）[2023]069号                     A  ...        数据有效   \n",
       "8310      中大招（货）[2023]069号                     A  ...        数据有效   \n",
       "8311      中大招（服）[2023]127号                     C  ...        数据有效   \n",
       "8312      中大招（服）[2023]127号                     C  ...        数据有效   \n",
       "8313      中大招（服）[2023]127号                     C  ...        数据有效   \n",
       "\n",
       "        data_create_time    data_modify_time  is_two_envelope  \\\n",
       "0                    NaN                 NaN              NaN   \n",
       "1                    NaN                 NaN              NaN   \n",
       "2                    NaN                 NaN              NaN   \n",
       "3                    NaN                 NaN              NaN   \n",
       "4                    NaN                 NaN              NaN   \n",
       "...                  ...                 ...              ...   \n",
       "8309  10/8/2023 09:30:43  10/8/2023 09:30:43              NaN   \n",
       "8310  10/8/2023 09:30:43  10/8/2023 09:30:43              NaN   \n",
       "8311  18/8/2023 09:31:09  18/8/2023 09:31:09              NaN   \n",
       "8312  18/8/2023 09:31:09  18/8/2023 09:31:09              NaN   \n",
       "8313  18/8/2023 09:31:09  18/8/2023 09:31:09              NaN   \n",
       "\n",
       "     is_two_envelope_mean  is_dark  is_dark_mean judge_way  judge_way_name  \\\n",
       "0                     NaN      NaN           NaN       NaN             NaN   \n",
       "1                     NaN      NaN           NaN       NaN             NaN   \n",
       "2                     NaN      NaN           NaN       NaN             NaN   \n",
       "3                     NaN      NaN           NaN       NaN             NaN   \n",
       "4                     NaN      NaN           NaN       NaN             NaN   \n",
       "...                   ...      ...           ...       ...             ...   \n",
       "8309                  NaN      NaN           NaN       2.0           综合评分法   \n",
       "8310                  NaN      NaN           NaN       2.0           综合评分法   \n",
       "8311                  NaN      NaN           NaN       2.0           综合评分法   \n",
       "8312                  NaN      NaN           NaN       2.0           综合评分法   \n",
       "8313                  NaN      NaN           NaN       2.0           综合评分法   \n",
       "\n",
       "      type_flag  \n",
       "0           NaN  \n",
       "1           NaN  \n",
       "2           NaN  \n",
       "3           NaN  \n",
       "4           NaN  \n",
       "...         ...  \n",
       "8309        NaN  \n",
       "8310        NaN  \n",
       "8311        NaN  \n",
       "8312        NaN  \n",
       "8313        NaN  \n",
       "\n",
       "[8314 rows x 44 columns]"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.merge(data2,projectInfo,on=['source_id'],how='left')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "0ef206bc",
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "# 呢个合并有问题，因为INDEX 不一样\n",
    "# pd.concat([data2,projectInfo],axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "433c4f54",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
